<include file="Public:header" />
<link rel="stylesheet" href="__PUBLIC__/test/css/test-addimg.css" type="text/css" media="screen" />
<div id="body-center" class="margin w960">
		<div id="left" class="font font-14 align-left">
				<ul>
						<li><a href="__APP__/Index/index">更新通知</a></li>
						<li><a href="__APP__/User/index">我的资料</a></li>
						<li><a href="__APP__/Pwd/index">修改密码</a></li>
						<li><a href="__APP__/Url/index">招聘网址</a></li>
				</ul>
		</div>

		<div id="right" class="align-right font">
				<div id="right-warp" class="font-14">
					<script type="text/javascript">
					function readURL(input) {
						if (input.files && input.files[0]) {
							var reader = new FileReader();
							reader.onload = function (e) { $('#img_prev').attr('src', e.target.result); };
							reader.readAsDataURL(input.files[0]);
						} else {
							//IE下，使用滤镜
							var docObj = document.getElementByIdx_x('doc');
							docObj.select();
							//解决IE9下document.selection拒绝访问的错误
							docObj.blur();
							var imgSrc = document.selection.createRange().text;
							var localImagId = document.getElementByIdx_x("localImag");
							$('#localImag').width(150).height(200); //必须设置初始大小
							//图片异常的捕捉，防止用户修改后缀来伪造图片
							try {
								localImagId.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale)";
								localImagId.filters.item("DXImageTransform.Microsoft.AlphaImageLoader").src = imgSrc;
							} catch (e) {
								alert("您上传的图片格式不正确，请重新选择!"); return false;
							}
							$('#img_prev').hide();
							document.selection.empty();
						}
					}
					</script>
					<div><input type='file' id="doc" onchange="readURL(this);"/></div>
					<div id="localImag" class="align-left">
						<img id="img_prev" src="" alt="上传你的图像"/>
					</div>
					<div class="align-right">
						<div id="cut"></div>
						<span class="btn">确定裁剪</span>
					</div>
						<div class="clear"></div>
			</div>
	</div>
		<div class="clear"></div>
</div>
</body>
</html>